package com.hxd.qzg.common.enums;

import com.hxd.qzg.common.ServiceException;

public enum QzRequestEnum {
	REQUEST_OPEN(0, "申请开柜"), QZ(2, "取证"), FZ(3, "放证"), GG(4, "关柜");


	QzRequestEnum(int code, String description) {
		this.code = code;
		this.description = description;
	}

	private int code;

	private String description;

	public int getCode() {
		return code;
	}

	public String getDescription() {
		return description;
	}

	public static String  getDescription(int code) {
	     
        for (QzRequestEnum statusEnum : QzRequestEnum.values()) {
        	
          if (statusEnum.code==code) {
			
        	  return statusEnum.getDescription();
			}
        }
		throw new ServiceException("盒子当前状态不存在");
	 }

}
